package com.mihuo.entity.common;

public class PageParam {

    private Integer current;
    private Integer size;
    private Integer start;

    public Integer getCurrent() {
        if (current == null) {
            current = 1;
        }
        return current;
    }

    public void setCurrent(Integer current) {
        this.current = current;
    }

    public Integer getSize() {
        if (size == null) {
            size = 20;
        }
        return size;
    }

    public void setSize(Integer size) {
        this.size = size;
    }

    public Integer getStart() {
        if (start == null) {
            start = (getCurrent() - 1) * getSize();
        }
        return start;
    }

    public void setStart(Integer start) {
        this.start = start;
    }
}
